package cn.yunhe.service;

import org.apache.ibatis.session.SqlSession;

import cn.yunhe.dao.UserDao;
import cn.yunhe.po.User;
import cn.yunhe.util.SqlSessionFactoryUtil;

public class UserService {

	SqlSession sqlsession = null;

	public User login(String username, String password) {
		sqlsession = SqlSessionFactoryUtil.getSqlSession();
		UserDao userDao = sqlsession.getMapper(UserDao.class);
		User user = userDao.login(username, password);
		return user;

	}

}
